

import {Card,Row,Col} from 'antd'
import React from 'react'
import {Link} from 'react-router-dom'

//import headimg from 'img'

import './style.css'
class HeadImgConent extends React.Component{
	constructor(props){
		super(props);
		
		
	}
	render(){
		let imgsrc = this.props.imgsrc?this.props.imgsrc:require('img/1-02.jpg')
		return(
			<div >
			  <Row>
			  	<Col span={12}>
			    	<div className="headimgbox"><img width={96} height={96} src={imgsrc} /></div>
			    	<div className="updateheadimg"><Link to="/update-head-img">修改头像</Link></div>
			  	</Col>
			  	<Col span={12}>
				  	{
				  		this.props.nickName?<p>昵称：{this.props.nickName}</p>
				  		:<Link to="/user-nick"><p>设置昵称</p></Link>
				  	}						
						<p><Link to="/user-base">修改个人资料</Link></p>
			  	</Col>
			  </Row>
			  <Row>
			  	<Col span={24}>
						<div><b>最近一次登录：</b></div>
						{this.props.loginDate} {this.props.loginAddress}
			  	</Col>
			  </Row>
		  </div>
		)
	}
}

export default HeadImgConent;